package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaiFocusMapper;
import com.ruoyi.system.domain.BaiFocus;
import com.ruoyi.system.service.IBaiFocusService;

/**
 * 焦点图Service业务层处理
 * 
 * @author saruri
 * @date 2024-07-22
 */
@Service
public class BaiFocusServiceImpl implements IBaiFocusService 
{
    @Autowired
    private BaiFocusMapper baiFocusMapper;

    /**
     * 查询焦点图
     * 
     * @param id 焦点图主键
     * @return 焦点图
     */
    @Override
    public BaiFocus selectBaiFocusById(Long id)
    {
        return baiFocusMapper.selectBaiFocusById(id);
    }

    /**
     * 查询焦点图列表
     * 
     * @param baiFocus 焦点图
     * @return 焦点图
     */
    @Override
    public List<BaiFocus> selectBaiFocusList(BaiFocus baiFocus)
    {
        return baiFocusMapper.selectBaiFocusList(baiFocus);
    }

    /**
     * 新增焦点图
     * 
     * @param baiFocus 焦点图
     * @return 结果
     */
    @Override
    public int insertBaiFocus(BaiFocus baiFocus)
    {
        baiFocus.setCreateTime(DateUtils.getNowDate());
        return baiFocusMapper.insertBaiFocus(baiFocus);
    }

    /**
     * 修改焦点图
     * 
     * @param baiFocus 焦点图
     * @return 结果
     */
    @Override
    public int updateBaiFocus(BaiFocus baiFocus)
    {
        return baiFocusMapper.updateBaiFocus(baiFocus);
    }

    /**
     * 批量删除焦点图
     * 
     * @param ids 需要删除的焦点图主键
     * @return 结果
     */
    @Override
    public int deleteBaiFocusByIds(Long[] ids)
    {
        return baiFocusMapper.deleteBaiFocusByIds(ids);
    }

    /**
     * 删除焦点图信息
     * 
     * @param id 焦点图主键
     * @return 结果
     */
    @Override
    public int deleteBaiFocusById(Long id)
    {
        return baiFocusMapper.deleteBaiFocusById(id);
    }
}
